<template>
	<view class="main">
		<u-navbar :title="state.title" :autoBack="true" :placeholder="true" :titleStyle="state.titleStyle" :height="40"
			bgColor="#fff">
		</u-navbar>
		<view class="content">
			<u-parse :content="state.center"></u-parse>
		</view>
	</view>
</template>

<script setup>
	import {
		ref,
		reactive,
	} from 'vue';
	import sheep from '@/sheep';
	import {
		onLoad,
	} from '@dcloudio/uni-app';
	onLoad((options) => {
		state.title=options.title
		state.config=options.config
		getConfigSet()
	});
	// banner图
	async function getConfigSet() {
		const {code,data} = await sheep.$api.test.configSet({
			config:state.config
		})
		if (code == 1) {
		   state.center=data
		   console.log(data)
		}
	}
	const state=reactive({
		config:'',
		title:'',//标题
		center:'',//内容
		titleStyle: 'fontWeight:bold',
	})
</script>

<style lang="scss">
page{
	.main{
		.content{
			padding:20rpx 32rpx;
			font-size: 28rpx;
			font-family: PingFang SC-Medium, PingFang SC;
			font-weight: 500;
			color: #333333;
			line-height: 48rpx;
		}
	}
}
</style>
